package gamecenter.gc.controller;

import gamecenter.gc.bean.Game;
import gamecenter.gc.service.Game_Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class Game_Controller {
    @Autowired
    private Game_Service game_service;

    @RequestMapping(value = "get_all_on_game", method = RequestMethod.GET)
    public List<Game> get_all_On_Game() {
        return game_service.get_all_On_Game();
    }

    @RequestMapping(value = "get_Cer_Game_From_Name", method = RequestMethod.GET)
    public Game get_Cer_Game_From_Name(String game_name) {
        return game_service.get_Cer_Game_From_Name(game_name);
    }

    @RequestMapping(value = "get_on_game_from_developer", method = RequestMethod.GET)
    public List<Game> get_all_On_Game_From_Developer(String developer_name) {
        return game_service.get_all_On_Game_From_Developer(developer_name);
    }

    @RequestMapping(value = "get_game_from_developer", method = RequestMethod.GET)
    public List<Game> get_all_Game_From_Developer(String developer_name) {
        return game_service.get_all_Game_From_Developer(developer_name);
    }

    @RequestMapping(value = "get_All_Game_from_Cer_Category", method = RequestMethod.GET)
    public List<Game> get_All_Game_from_Cer_Category(String category) {
        return game_service.get_All_Game_from_Cer_Category(category);
    }



}
